/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package util;

import java.util.List;
import javax.swing.AbstractListModel;

/**
 *
 * @author nMoncho
 */
public class PreferenciaListModel<E> extends AbstractListModel{

    private List<E> modelo;

    public PreferenciaListModel(List<E> modelo){
        this.modelo = modelo;
    }

    @Override
    public int getSize() {
        return modelo.size();
    }

    @Override
    public Object getElementAt(int index) {
        return modelo.get(index);
    }
    
    public void addElement(E obj){
        modelo.add(obj);
    }

    public void removeElement(E obj){
        modelo.remove(obj);
    }

}
